Module Efficiency History and Projections¶

In [1]:
import numpy as np
import pandas as pd
import os,sys
import matplotlib.pyplot as plt
plt.rcParams.update({'font.size': 22})
plt.rcParams['figure.figsize'] = (12, 8)

This journal covers the development of a historical baseline and baseline future projection of average module efficiency for each installation year.

In [2]:
cwd = os.getcwd() #grabs current working directory
skipcols = ['Source']
mod_eff_raw = pd.read_csv(cwd+"/../../../PV_ICE/baselines/SupportingMaterial/module_eff.csv", 
                          index_col='Year', usecols=lambda x: x not in skipcols)
mod_eff_raw['mod_eff'] = pd.to_numeric(mod_eff_raw['mod_eff'])
In [3]:
print(mod_eff_raw['mod_eff'][2019])
plt.plot(mod_eff_raw, marker='o')
19.2
Out[3]:
[<matplotlib.lines.Line2D at 0x122dfb070>]

There appears to be an "outlier" in 2003. This is from a different source. It does however, fit within the range of module efficiency specified in the prior data point (2001, avg = 13.6, min = 12, max = 16.1). For the purposes of interpolation, we will drop this single datapoint.

In [4]:
mod_eff_raw['mod_eff'][2003]=np.nan
plt.plot(mod_eff_raw, marker='o')
Out[4]:
[<matplotlib.lines.Line2D at 0x132131660>]

Now interpolate for missing years. Going to break into 2 parts for this, a linear historical part, and an exponential decay out to 2050.

In [5]:
mod_eff_early = mod_eff_raw.loc[(mod_eff_raw.index<=2019)]
mod_eff_history = mod_eff_early.interpolate(method='linear',axis=0)
#print(mod_eff_history)
plt.plot(mod_eff_history)
Out[5]:
[<matplotlib.lines.Line2D at 0x1321a69b0>]
In [6]:
# Import curve fitting package from scipy
from scipy.optimize import curve_fit
# Function to calculate the power-law with constants a and b
def power_law(x, a, b):
    return a*np.power(x, b)
In [7]:
#generae a dataset for the area in between
mod_eff_late = mod_eff_raw.loc[(mod_eff_raw.index>=2020)]
y_dummy = power_law(mod_eff_late.index-2019, mod_eff_late['mod_eff'][2020], 0.065) #17.9
#played around with the exponential until y_dummy[31] closely matched projected 25.06% value. CITE
print(y_dummy[30])
plt.plot(y_dummy)
25.001640478254142
Out[7]:
[<matplotlib.lines.Line2D at 0x169d91ba0>]
In [8]:
#create a dataframe of the projection
mod_eff_late['mod_eff'] = y_dummy
#print(mod_eff_late)
plt.plot(mod_eff_late)
#mod_eff_late.to_csv(cwd+'/../../../PV_ICE/baselines/SupportingMaterial/output_module_eff_perovskite.csv', index=True)
/var/folders/w2/85_h_nyn0mlbxf81x3k9n53xh90n_1/T/ipykernel_98558/988262430.py:2: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  mod_eff_late['mod_eff'] = y_dummy
Out[8]:
[<matplotlib.lines.Line2D at 0x169e94ee0>]

Now smash the two dataframes back together for our average module efficiency baseline.

In [9]:
mod_eff = pd.concat([mod_eff_history, mod_eff_late])
mod_eff.to_csv(cwd+'/../../../PV_ICE/baselines/SupportingMaterial/output_avg_module_eff_final.csv', index=True)
plt.plot(mod_eff)
plt.title('Average Module Efficiency (%)')
plt.ylabel('Efficiency (%)')
Out[9]:
Text(0, 0.5, 'Efficiency (%)')
In [14]:
#graph for paper
plt.rcParams.update({'font.size': 22})
plt.rcParams['figure.figsize'] = (12, 8)

plt.axvspan(2021, 2050.5, facecolor='gray', alpha=0.1)
plt.plot(mod_eff_raw, marker='o', label='Raw Data')
plt.plot(mod_eff, '--k', label='PV ICE Baseline')
plt.title('Average Module Efficiency [%]')
plt.ylabel('Efficiency [%]')
plt.legend()
plt.xlim([1974, 2050.5])
plt.legend(frameon=False, bbox_to_anchor=(1.05, 1.0), loc='upper left')
Out[14]:
<matplotlib.legend.Legend at 0x13205b5b0>

Bifaciality Factor¶

With the advent of bifacial cells and modules with transparent backsheets/glass, there is a bonus energy produced from the slightly less efficient backside cell. This section of the journal records the increasing bifaciality factor, which is how this extra generation is currently tracked (2021).

Current procedure is to update the historical and projected factors in the baseline file, then run it through here to interpolate, and replace the file.

In [11]:
cwd = os.getcwd() #grabs current working directory
bifi_raw = pd.read_csv(cwd+"/../../../PV_ICE/baselines/baseline_bifaciality_factor.csv", 
                          index_col='Year')
In [12]:
bifi = bifi_raw.interpolate()
plt.plot(bifi)
plt.ylim(0,1.0)
Out[12]:
(0.0, 1.0)
In [13]:
bifi.to_csv(cwd+'/../../../PV_ICE/baselines/baseline_bifaciality_factor.csv', index=True)